
## Created by Anjuta

PACKAGES = main screen points camera object objects_manager obj_model matrix \
		obj_simple menu index directory shortcuts mouse_control light
SRC_DIR=./src/
OBJ_DIR=./obj/
SRC_EXT=.c
OBJ_EXT=.o
OBJECTS = $(addsuffix $(OBJ_EXT),$(addprefix $(OBJ_DIR),$(PACKAGES)))


CC = gcc
CFLAGS = -g -Wall -msse -msse2 -msse3
INCFLAGS = -L./src/ -I./src/ -L./lib/soil/src/ -I./lib/soil/src/
LDFLAGS = -Wl,-rpath,/usr/local/lib
LIBS = -lGL -lGLU -lglut -lm
VPATH = $(SRC_DIR)

all: projeto_MO603

projeto_MO603: $(OBJECTS)
	$(MAKE) -C ./lib/soil/projects/makefile
	$(CC) -o projeto_MO603 ./lib/soil/projects/makefile/obj/image_DXT.o \
	 ./lib/soil/projects/makefile/obj/image_helper.o \
	 ./lib/soil/projects/makefile/obj/SOIL.o \
	 ./lib/soil/projects/makefile/obj/stb_image_aug.o \
	 $(OBJECTS) $(LDFLAGS) $(LIBS)

.SUFFIXES:
.SUFFIXES:	.c .cc .C .cpp .o

#.c.o :
#	$(CC) -o $@ -c $(CFLAGS) $< $(INCFLAGS)

$(OBJECTS):$(OBJ_DIR)%$(OBJ_EXT): $(SRC_DIR)%$(SRC_EXT)
	$(CC) -o $@ -c $(CFLAGS) $< $(INCFLAGS)

count:
	wc *.c *.cc *.C *.cpp *.h *.hpp

clean:
	$(MAKE) clean -C ./lib/soil/projects/makefile
	rm -f $(OBJECTS) projeto_MO603

.PHONY: all
.PHONY: count
.PHONY: clean
